package com.zyy.builder.demo02;

/**
 * 具体的Build 如：工人 具体施工，对外可以获取这个产品
 */
public class Worker extends Builder {
    private Product product;

    public Worker() {
        product = new Product();
    }

    @Override
    Builder buildA(String stepA) {
        product.setStepA(stepA);
        return this;
    }

    @Override
    Builder buildB(String stepB) {
        product.setStepB(stepB);
        return this;
    }

    @Override
    Builder buildC(String stepC) {
        product.setStepC(stepC);
        return this;
    }

    @Override
    Builder buildD(String stepD) {
        product.setStepD(stepD);
        return this;
    }

    @Override
    Product getProduct() {
        return product;
    }
}
